home *** CD-ROM | disk | FTP | other *** search
/ Reverse Code Engineering RCE CD +sandman 2000 / ReverseCodeEngineeringRceCdsandman2000.iso / RCE / Library / Manuels & Misc / Assembly / AOA.ZIP / CH06 / IBMLINC.A < prev    next >
Encoding:
Text File  |  1994-11-18  |  1.9 KB  |  109 lines

  1.         PAGE    60,132
  2.         NAME    IBMLFILE
  3.         TITLE    IBM/L Version 2.1
  4. ;============================================
  5.  
  6.  
  7.  
  8.         include    stdlib.a
  9.         includelib stdlib.lib
  10.  
  11.  
  12. ;    M A C R O S
  13.  
  14.  
  15.  
  16.         .XALL
  17. ;============================================
  18. DSEG        segment    para public 'data'
  19. ;##
  20. ;
  21. @OuterLoopCtr    dw    ?
  22. @InnerLoopCtr    dw    ?
  23.  
  24. @XTFlag        DW    0    ; 0 =AT
  25.                 ; 1 =XT -- shr ax,2 will not work
  26. @TimeStart    DW    0    ; in ticks since midnight
  27. @TimeStop    DW    0
  28. @Overhead    DW    0
  29.  
  30. ;    M E S S A G E S
  31.  
  32.  
  33. DSEG        ends
  34. ;
  35. ;
  36. ;
  37. ;
  38. CSEG        segment
  39.         assume    cs:cseg, ds:dseg, es:dseg, ss:sseg
  40. ;
  41.         public    PSP
  42. PSP        dw    ?
  43. ;
  44. ;
  45. @Main        proc
  46.         mov    cs:PSP, es        ;Save pgm seg prefix
  47.         mov    ax, seg dseg        ;Set up the segment registers
  48.         mov    ds, ax
  49.         mov    es, ax
  50.         mov    dx, 0
  51.         MemInit                ;Initialize Memory Manager
  52. ;
  53.         mov    ax, seg dseg
  54.         mov    ds, ax
  55.         mov    es, ax
  56.         print
  57.         db    cr,lf,lf
  58.         DB     "           ░▒▓█ IBM/L 2.1 █▓▒░",cr,lf,lf
  59.         DB     "Public Domain Instruction Benchmarking Language",cr,lf
  60.         dB     "   by Randall Hyde,  inspired by Roedy Green",cr,lf
  61.         DB     "All times are measured in ticks, accurate "
  62.         db    "only to ± 2.",cr,lf
  63.         db    cr,lf
  64.         db    "CPU: 80",0
  65.         cpuident
  66.         puti
  67.         putcr
  68.         putcr
  69.  
  70. ;##
  71.  
  72.         mov    ax,4C00h    ; exit errorlevel = 0
  73.         int    21h
  74. @Main        ENDP
  75.  
  76. ;============================================
  77.  
  78. @GetTicks    PROC    Near
  79.  
  80. ;    Get time of day in 1/18.2 second clock ticks since midnight.
  81. ;    leaves tick count in CX:DX, we will ignore high order part.
  82. ;    For accurate results, don't call this too often.
  83. ;    In some systems the clock gets behind if you call
  84. ;    GetTicks in a tight loop.
  85.  
  86.         MOV    AH,0
  87.         INT    1Ah        ; BIOS ticks since midnight
  88.                     ; CX:DX is count
  89.                     ; ignore midnight trouble
  90.         RET
  91. @GetTicks    EndP
  92.  
  93.  
  94.  
  95. CSEG        ends
  96. ;
  97. ;
  98. sseg        segment    para stack 'stack'
  99.         dw    256 dup (?)
  100. sseg        ends
  101. ;
  102. ;
  103. zzzzzzseg    segment    para public 'zzzzzz'
  104. LastBytes    db    16 dup (?)
  105. zzzzzzseg    ends
  106.         end     @Main
  107. ;##
  108. ;
  109.